import { createApp } from 'vue';
import { createPinia } from 'pinia';
import { i18n } from '@/locales/index.js';

import App from './App.vue';
// 弹出对话框
import DzModal from './common/DzModalService';

// element plus 相关
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import 'element-plus/theme-chalk/dark/css-vars.css';

import 'font-awesome/css/font-awesome.css';
import './styles/style.css';
import { ElMessageBox } from 'element-plus';

// 自定义样式
// import './styles/main.css'
import './styles/element-reset.css';

(window as any).CESIUM_BASE_URL = './lib/cesium';
window.alert = function (msg) {
  ElMessageBox.alert(msg, '提示', {
    dangerouslyUseHTMLString: true
  }).catch(() => {});
};

const app = createApp(App);
app.use(createPinia());
app.use(DzModal);
app.use(ElementPlus);
app.use(i18n);

app.mount('#app');
